package Message_Bridge_08;

import Message_Bridge_08.Message.CommonMessage;
import Message_Bridge_08.Message.UrgentMessage;
import Message_Bridge_08.SendMessage.EmailSender;
import Message_Bridge_08.SendMessage.SmsSender;

public class MessageApplication {
    public static void main(String[] args) {
        // 创建消息发送者
        MessageSender emailSender = new EmailSender();
        MessageSender smsSender = new SmsSender();

        AbstractMessage commonMessage = new CommonMessage(emailSender);
        commonMessage.send();

        AbstractMessage urgentMessage = new UrgentMessage(smsSender);
        urgentMessage.send();
    }
}
